Albert is a nifty little application that can launch Applescripts by sending it an email. You can use any email account to send Albert a command. Albert looks at the Subject line and first body line of each email for a special "Authorization code", and then launches any scripts listed in the body.
Please take note that Albert will DELETE any message sent to the account it checks if the Subject line or first line in the body is the Authorization Code!
How to use it:
Albert must have a valid POP3 email account to check, and an SMTP server to send confirmation emails. Albert then checks each email for it's "Authorization Code" as the subject or the first line of the body text. If finds the match, it then checks the body of the email for any commands to run scripts. The scripts must be stored in the folder called "Scripts", which is located in the same folder as Albert (you can make an alias to another folder, as long as the alias is named "Scripts"). The scripts must be fully compiled Applescripts (Applets).
Sending Commands:
In order to send a command to Albert, you must use the Authorization Code as either the subject line or the first line in the body of the email, and nothing else. Then, to specify an Applescript to run, type "Exec:" and the script name in the body, on it's own line. An example would be:
Exec: Empty the Trash
This will cause Albert to run the Applescript called "Empty the Trash" in the Scripts folder. There does not need to be a space between the colon (:) and the script name.
You can also launch multiple Applescript in one email, but make sure each "Exec:" command is on it's own line. For example:
Exec: CleanupDesktop
Exec: Empty the Trash
This would cause Albert¬ to launch the Applescript called "CleanupDesktop" AND the script called "Empty the Trash".
You can also have Albert send you a list of all available scripts by putting "List" on a separate line, like this:
List
Exec: CleanupDesktop
Exec: Empty the Trash
This would cause Albert to run the two Applescript listed, and also send you an email of all available scripts.
You can also tell Albert to quit by using the command "Quit".
Passing arguments a to script:
Albert can now pass arguments to Applescripts. The arguments are ALWAYS passed as strings, so you must coerce them to the appropriate value type inside your Applescript if necessary. To pass an argument to an Applescript, put the argument within parenthesis, and in quotes. Separate each argument by a comma.
Example One: Passing a single argument:
Exec: ShowMessage ("Hello World!")
This will execute the script called ShowMessage, which is written to accept a string argument. The script then displays the message "Hello World!" (without quotes).
Example Two: Passing multiple arguments:
Exec: ShowMoreMessages ("Hello Wordl!","I like cheese")
This passes the two strings, "Hello World!" and "I like cheese" to the Applescript called ShowMoreMessages, each string as a single parameter.
You can use quotations in the arguments. Albert looks for the "," delimiter to separate its arguments. So ("Hello, my name is "Cheese"") would send the quotes around the word "Cheese" as an argument, because the string still begins and ends in quotes.
Other options:
You can change the Authorization Code used to tell Albert to run a script from "Albert:" to anything you wish in the Preferences window or the Setup Assistant. Also, you can optionally turn off the requirement for only accepting emails from an authorized person. This may not be wise, however, as any who knows the Authorization Code can then run scripts on your Mac. There are many other options for Albert, so just play around in the Preferences Panel.
Changes:
Version 2.0: Total Rewrite.
Ñ Now runs under Mac OSX
Ñ Passing arguments to scripts now supported
Ñ Scripts commands are now sent in the body of the email
Ñ Authorization Code is now required as the subject or first line of body
Ñ Setup Assistant added
Ñ Much more. Look around.
Version 1.2.6: Fixed bug that would not allow you to save preferences changes unless a reply email was used, even if Authorized Sender was off.
Version 1.2.5 has the option to check immediately at launch for emails. It actually could do this before, but not in a clear way. I also cleaned up the settings window a bit.
Version 1.2 adds the ability to turn off or on the Authorized sender, and you can customize the Launch Command (I.E., "Albert:" used to launch Applescripts)
How much is Albert¬?
Totally, absolutely, 159% free.
System Requirements:
Mac OS 8.6 or higher (including OS X 10.1), Internet connection (dedicated is best), Carbon Lib 1.2.5 or higher, 4 MB RAM, Applescript.
Disclaimer:
StimpSoft¬ and its employees (I.E., John Schilling) are in no way responsible for any damages or data loss incurred to you or your computer. Although Albert has been thoroughly tested, please use this application with caution.